<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>短信平台-首页</title>
<link rel="stylesheet" href="/workflow/resource/src/bootstrap-3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="/workflow/resource/src/bootstrap-3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/workflow/resource/src/css/chatRoom.css">
<link rel="stylesheet" href="/workflow/resource/src/layui/css/layui.css">
<script src="/workflow/resource/src/js/jquery-3.2.1.min.js"></script>
<script src="/workflow/resource/src/layui/layui.js"></script>
<style type="text/css">
	.rigth{
		float:right 
	}
	.system{
		   margin-left: 300px;
	}
</style>
</head>
<body class="layui-layout-body">
		<div class="container" style="width: 800px;">
<div  class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">
           	 短信记录
        </h3>
    </div>
<div id="main" class="panel-body">
    <div id="scroll" data-spy="scroll" >
    <ul  class="list-group">
    		<c:forEach items="${data}" var="item"> 
			     <c:choose>
				   <c:when test="${item.type == 1}">  
				   		  <li class="list-group-item">
					            <div >
					                <span class="label label-danger">系统:</span>
					              		${item.content}
					              	<span class="label label-warning rigth">
					              		<fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
					              	</span>
					            </div>
					      </li>
				   </c:when>
				   <c:otherwise> 
				   		 <li class="list-group-item">
					            <div>
					                <span class="label label-info system">${item.phone}:</span>
					                <span class="">${item.content} </span>
					              	<span class="label label-warning rigth">
					              		<fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
					              	</span>
					            </div>
					      </li>
				   </c:otherwise>
				</c:choose>
			</c:forEach>  
    </ul>
</div>
</div>
</div>
</div>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="/workflow/resource/src/js/jquery-1.11.0.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="/workflow/resource/src/bootstrap-3.3.5/js/bootstrap.min.js"></script>
</body>
</html>